home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / prog_d / oleauttr.zip / README.1ST < prev    next >
Text File  |  1996-01-12  |  7KB  |  135 lines

  1.                    README.1ST file for TOleAutoClient V1.1
  2.                         *** TRIAL-RUN VERSION ***
  3.  
  4. *** THIS TRIAL-RUN COMPONENT IS DESIGNED TO FUNCTION ONLY WHEN
  5. *** THE DELPHI IDE ITSELF IS RUNNING.  APPLICATIONS COMPILED
  6. *** WITH THE TRIAL-RUN VERSION WILL NOT FUNCTION CORRECTLY
  7. *** UNLESS DELPHI IS RUNNING.
  8.  
  9. *** THIS TRIAL-RUN VERSION IS LICENSED FOR EVALUATION PURPOSES
  10. *** ONLY.  YOU MAY NOT DISTRIBUTE APPLICATIONS COMPILED WITH
  11. *** IT.  FOR ANY PURPOSE OTHER THAN EVALUATION TO DETERMINE
  12. *** SUITABILITY FOR USE, YOU MUST PURCHASE THE COMMERCIAL VERSION.
  13. *** SEE THE FILE ANNOUNCE.TXT OR ORDER.TXT FOR AN ORDER FORM.
  14.  
  15. *** THIS TRIAL-RUN VERSION IS ACCOMPANIED BY ALL DOCUMENTATION
  16. *** AND SAMPLE CODE INCLUDED WITH THE COMMERCIAL VERSION.
  17. *** NO SUPPORT WHATSOEVER WILL BE PROVIDED FOR THIS TRIAL-RUN VERSION.
  18.  
  19. *** SEE THE FILE LICENSE.TXT FOR THE TERMS UNDER WHICH THIS
  20. *** SOFTWARE AND ITS ACCOMPANYING DOCUMENTATION AND FILES MAY BE USED.
  21.  
  22. *** IT IS NOT POSSIBLE TO HAVE BOTH THIS TRIAL-RUN VERSION
  23. *** AND THE COMMERCIAL VERSION OF THE COMPONENT INSTALLED
  24. *** ON YOUR DELPHI COMPONENT PALETTE AT THE SAME TIME.
  25.                             
  26. Installing the TOleAutoClient component:
  27.  
  28. 0.      FIRST MAKE A BACKUP COPY OF THE COMPLIB.DCL FILE
  29.         LOCATED IN YOUR DELPHI\BIN DIRECTORY!!!
  30.  
  31. 1.      Copy the files OLEAUTO.DCU and OLEAUTO.DCR to your
  32.         DELPHI\LIB directory (for example, C:\DELPHI\LIB).
  33.         If you are upgrading from an earlier version of
  34.         this component, you may wish to back up these files
  35.         before performing this step.
  36.  
  37. 2.      Make new directories for each of the zipped example files
  38.         and use PKUNZIP to uncompress these .ZIP files.  (PKUNZIP
  39.         is a widely-available shareware program.)  You will
  40.         find that each of the example files contains useful
  41.         sample code to help you make the most effective use
  42.         of the component
  43.  
  44. 3.      Within Delphi, click on Options\Install Components and
  45.         fill in the dialog to Add the component (filename OLEAUTO.DCU).
  46.         If you are upgrading, before you click the Add button you
  47.         should first select OLEAUTO and then click the Remove
  48.         button to remove the previous version from your component
  49.         palette and COMPLIB.DCL file.
  50.  
  51. 4.      The TOleAutoClient component should appear on the Custom
  52.         page of your Component Palette.
  53.  
  54.         You should read all the .TXT and .DOC files on this diskette
  55.         to make the most effective use of this Delphi component.  But
  56.         for those who simply can't wait, here's something to help you
  57.         get started!
  58.  
  59. Before using the component:
  60.  
  61. 1.      Be sure that the OLE Automation server you plan to control
  62.         (e.g., Microsoft Word, or NUMSVR1.EXE supplied here) is present
  63.         on your hard disk, and be sure that you have run it at least once
  64.         as a standalone application (e.g., from Program Manager's
  65.         File|Run menu).  This is so it can register itself in your
  66.         system's Windows OLE registration database (\WINDOWS\REG.DAT)
  67.         or, if you're running Windows 95, in the Registry.
  68.  
  69. Using the component:
  70.  
  71. 1.      First, create a new unit and within the unit
  72.         derive a class from the TOleObject parent class (*NOT*
  73.         from TOleAutoClient) that "mirrors" the behaviour
  74.         (properties and methods) of the OLE object you want to
  75.         create.  For guidance in writing the "mirror" class,
  76.         refer to the examples given in the WORDCLS.PAS file within
  77.         WORDDRIV.ZIP and in the unit files in the other examples.
  78.         You can find more detailed information on the public interface
  79.         to the TOLEObject and TAutoClient classes defined in
  80.         OLEAUTO.DCU in the accompanying files OLEAUTO.INT and
  81.         OLEAUTO.TXT and NESTOBJ.TXT.
  82.  
  83.         Add the name of this new unit to the "uses" clause of any unit
  84.         you want to be able to access the OLE Automation server.
  85.  
  86.         If you will be writing many mirror classes, you may wish
  87.         to investigate a shareware product called WithClass,
  88.         available through CompuServe and the Internet World Wide Web,
  89.         that can help you automate the process.
  90.  
  91. 2.      Place a TOleAutoClient component on your application's
  92.         main form just as you would any other Delphi component, like
  93.         a TLabel, TEdit, etc.  NOTE: Failing to do this will result
  94.         in the inability to start up OLE Automation servers if you
  95.         are running under Windows 3.x, although you can get away with
  96.         it under Windows 95!
  97.  
  98. 3.      Within your application, typically in the interface section of
  99.         the unit corresponding to your application's main form, declare
  100.         a variable representing an instance of the "mirror" class you
  101.         created in step 1.  Make sure the scope of this variable is
  102.         appropriate for your intended use (e.g., global, public, etc.).
  103.         For example, you might declare this variable as a public
  104.         member of the TForm1 class as
  105.                      public
  106.                         WordOb : TWordObject;
  107.         if TWordObject is your class derived from TOleObject.
  108.  
  109. 4.      Within your application, create an OLE object (that is, activate
  110.         the OLE Automation server) with the statement
  111.                 WordOb := TWordObject.CreateObject('word.basic');
  112.         in which the string passed to CreateObject must be the
  113.         OLE ProgID (program ID) string registered for the OLE object in
  114.         your systems registration database.  For Microsoft Word 6.0 this
  115.         string is 'word.basic'; for Excel it is 'Excel.Application'.
  116.         For other OLE Automation servers, consult the server documentation
  117.         or browse your system's registration database or Registry by
  118.         running "REGEDIT /v" from Program Manager's File|Run menu.
  119.         The string is not case-sensitive.
  120.  
  121.         The TOleAutoClient component can activate and control either
  122.         "local" (.EXE) OLE Automation servers or "in-process" (.DLL)
  123.         servers.  Under Windows 95, you can activate and control either
  124.         16-bit or 32-bit local (.EXE) servers.  However, you will not
  125.         be able to activate a 32-bit in-process (.DLL) server from
  126.         your 16-bit Delphi application.  This is a limitation of
  127.         Windows 95.
  128.  
  129. 5.      You access the properties and methods of the OLE object by
  130.         accessing the properties and methods of your "mirror" class.
  131.         See the examples supplied.  Also refer to the file OLEAUTO.TXT
  132.         supplied with this component.
  133.  
  134.  
  135.